import { h } from "vue";
import type { ColumnItem } from "../types/index.d";
function renderList(item: ColumnItem, row: any) {
  return h(
    "div",
    null,
    item.formList.map(field => {
      const fieldValue = row[field.prop];
      return h(
        "div",
        { key: field.prop },
        `${field.label}: ${fieldValue || "暂无数据"}`
      );
    })
  );
}
export default renderList;
